<template>
  <div class="computed">
    <div class="form-group-name">
      <label for="name">name</label>
      <input type="text" class="name" id="name" placeholder="name" v-model="register.name">
    </div>
    <div class="form-group-age">
      <label for="age">age</label>
      <input type="text" class="age" id="age" placeholder="age" v-model="register.age">
    </div>
    <div class="form-group-sex">
      <label for="sex">sex</label>
      <input type="text" class="sex" id="sex" placeholder="sex" v-model="register.sex">
    </div>
    <div class="form-group-email">
      <label for="name">email</label>
      <input type="text" class="email" id="email" placeholder="email" v-model="register.email">
    </div>
    <button type="submit" class="btn" :disabled="isDisabled">Submit</button>
    <h1>{{isDisabled}}</h1>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      register: {
        name: "",
        age: "",
        sex: "",
        email: ""
      }
    };
  },
  methods: {},
  components: {},
  computed: {},
  watch: {},
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  updated() {}, //生命周期 - 更新之后
  activated() {} //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>
<style lang='less' scoped>
//@import url(); 引入公共css类
</style>